import {reqPayInfo} from '@/api'
import { Message } from 'element-ui'
const actions = {
    async getPayInfo({commit},orderId){
        const result =await reqPayInfo(orderId)
        if (result.code ===200){
            commit ('SAVE_PAY_INFO',result.data)
        }else{
            Message.error(result.message)
        }
    }
}
const mutations = {
    SAVE_PAY_INFO(state,info){
        state.payInfo = info
    }
}
const state = {
    payInfo:{}
}
const getters = {}

export default {
    namespaced:true,
    actions,
    mutations,
    state,
    getters,
}